package lock.lock8;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2022-08-11 07:42
 **/
public class LockSyncDemo {

    Object object = new Object();

//    public synchronized void m1() {
//        synchronized (object) {
//            System.out.println("===========hello");
//        }
//    }

    public synchronized void m2() {
        System.out.println("===========hello");
    }

    public static void main(String[] args) {

    }
}
